<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/jsp/common/common.jspf"%>
<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title></title>

		<!--Import materialize.css-->
		<link type="text/css" rel="stylesheet" href="${ctx}/static/css/materialize.min.css" media="screen,projection" />
		<!-- 导入补充样式 -->
		<link type="text/css" rel="stylesheet" href="${ctx}/static/css/supplement.css" />
		<!-- Material Design图标 -->
		<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

		<!--Let browser know website is optimized for mobile-->
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	</head>

	<body>
		<header>
			<nav>
				<div class="nav-wrapper">
					<div class="col s12" style="padding: 0 0.75em;">
						<a href="#" class="breadcrumb">员工管理</a>
						<a href="toEmployeeList.action" class="breadcrumb">员工维护</a>
						<a href="#" class="breadcrumb">员工添加</a>
					</div>
				</div>
			</nav>

			<div class="container"></div>
			<%@ include file="/jsp/nav.jsp" %>
		</header>

		<main>
			<div class="row">
				<div class="col s12 m10 110">
					<div class="row">
						<form class="col s8 card" method="post" action="saveEmployee.action">
							<div class="row"></div>
							<div class="row">
								<a class='dropdown-button btn' href='#' data-activates='dropdown'>选择部门</a>
								<ul id='dropdown' class='dropdown-content'>
									<c:forEach items="${departments}" var="d" varStatus="status">
                                        <li>
                                            <a department-id="${d.id}">${d.name}</a>
                                        </li>
                                    </c:forEach>
								</ul>
								<div class="input-field col s12" style="display: none;">
                                    <input id="departmentId" name="departmentId" type="text" class="validate" value="" />
                                    <label for="departmentId">部门ID</label>
                                </div>
							</div>
							<div class="row">
								<div class="input-field col s12">
									<input id="realName" name="realName" type="text" class="validate" />
									<label for="realName">姓名</label>
								</div>
							</div>
							<div class="row">
								<div class="input-field col s12">
									<input id="username" name="username" type="text" class="validate" />
									<label for="username">登录名</label>
								</div>
							</div>
							<div class="row">
								<div class="input-field col s12">
									<input id="password" name="password" type="password" class="validate" />
									<label for="password">密码</label>
								</div>
							</div>
							<div class="row">
								<div class="left" style="padding: 0 0.75rem;">性别</div>
								<p>
									<input name="sex" type="radio" value="男" id="male" checked="checked" />
									<label for="male">男</label>
									<input name="sex" type="radio" value="女" id="female" />
									<label for="female">女</label>
								</p>
							</div>
							<div class="row">
								<div class="input-field col s12">
									<input id="phone" name="phone" type="text" class="validate" />
									<label for="phone">电话</label>
								</div>
							</div>
							<div class="row">
								<div class="input-field col s12">
									<input id="email" name="email" type="email" class="validate" />
									<label for="email" data-error="wrong" data-success="right">email</label>
								</div>
							</div>
							<div class="row">
								<div class="input-field col s12">
									<textarea id="remark" name="remark" class="materialize-textarea"></textarea>
									<label for="remark">备注</label>
								</div>
							</div>
							<div class="row right">
								<input type="submit" class="btn" value="提交" />
								<a class="waves-effect waves-light btn" href="toEmployeeList.action">返回</a>
							</div>
						</form>
					</div>
				</div>
			</div>
		</main>

		<script src="${ctx}/static/js/jquery-3.1.0.min.js"></script>
		<script src="${ctx}/static/js/materialize.min.js"></script>
		<script src="${ctx}/static/js/supplement.js"></script>
	</body>

</html>